<html>
<!-- =====================================================================

  File:      DemographicsPage.htm for Adventure Works Cycles Storefront Sample
  Summary:   Self-documentation for application
  Date:	     September 23, 2003

=====================================================================

  This file is part of the Microsoft SQL Server Code Samples.
  Copyright (C) Microsoft Corporation.  All rights reserved.

This source code is intended only as a supplement to Microsoft
Development Tools and/or on-line documentation.  See these other
materials for detailed information regarding Microsoft code samples.

THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
PARTICULAR PURPOSE.

======================================================= -->
    <head>
        <title>Adventure Works Cycles Store Documentation</title>
        <link rel="stylesheet" href="style.css">
    </head>
    <body class="NormalIndent">
        <h1>
            Demographics Page
        </h1>
        <b>Description:</b> The demographics page captures additional information about the customer
        who has just registered a new account at the web site.  This demographic information is stored in the database as an XML document.
        <br />
        <br />
        Microsoft&reg; SQL Server&trade; 2005 provides XML typed columns. Data stored in these 
        colums must be XML documents.  These documents can be arbitrary well-formed XML, or they may be contrained to only contain
        documents which match a particular XML schema.  XML Schemas may also be stored in the database to
        enable an XML column to reference a particular XML schema.
        <br />
        <br />
        In the Adventure Works Cycles Storefront sample, after initial registration is complete, the user
        is asked a series of questions (birthday, family information, hobbies, etc.).  This demographic 
        information is then stored in the database as an XML document.  This information could then be used
        for various Business Intelligence scenarios. 
        <br>
        <br>
        <strong>Implementation Notes:</strong> The AdventureWorks database defines an Individual table with an 
        XML typed column called Demographics.  The database also defines the XML Schema for the 
        http://schemas.adventure-works.com/Individual/Survey namespace.  The Demographics column is restricted to only
        contain XML documents which comply with Survey schema.  The demographics.aspx web form captures the demographic
        information from the user, and the code in the Demographics.aspx.cs, CustomerDB.cs, and the usp_CustomerAddSurvey
        stored procedure create the XML and store it into the Demographics column for the appropriate row in the Individual table. 
        Finally, the browser is redirected back to the shopping cart implemented by the <a href="shoppingcart_aspx.htm">ShoppingCart.aspx</a> page.      
    </body>
</html>
